<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="main" style="width: 800px;height: 600px;"></div>
    <script src="./lib/echarts.min.js"></script>
    <script>
        let myChart = echarts.init(document.getElementById('main'))
        const option = {
            // 标题
            title: {
                // 标题的文本
                text: '商品销量',
                textStyle:{
                    textShadowColor:'red',
                    textShadowBlur:3,
                    textShadowOffsetX:2,
                    textShadowOffsetY:2
                }
            },
            tooltip: {},
            legend: {
                // show: true,
                data: ['销量'],
                right:80,
                top:5,
                itemStyle:{
                    color:'skyblue',
                    shadowColor:'red',
                    shadowBlur:3,
                    shadowOffsetX:2,
                    shadowOffsetY:2
                }
                
            },
            xAxis: {
                data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子', '西蓝花']
            },
            yAxis: {},
            series: [
                {
                name: '销量',
                type: 'bar',
                showBackground: true,
                colorBy: "data",
                data: [5, 30, 36, 10, 10, 20, 66]
                }
            ]
            // color:'#3ba272'
        }
        myChart.setOption(option)


    </script>
</body>
</html>